<%@page import="cn.bid.entity.User"%>
<%@page import="cn.bid.dao.user.UserDao"%>
<%@page import="cn.bid.dao.user.UserDaoI"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>ICEfaces, Ajax for Java EE</title>
    <link rel="stylesheet" type="text/css" href="./xmlhttp/css/rime/rime.css" />
  </head>
 
  <body>
    <%
    	request.setCharacterEncoding("utf-8");
    	String u=request.getParameter("username");
    	String p=request.getParameter("password");
    	out.print(u+","+p);
    	UserDaoI userDao=new UserDao();
    	User user=userDao.login(u, p);
    	if(user!=null){
    		session.setAttribute("USER_LOGIN", user);
    		response.sendRedirect("index.jsp");
    		return;
    	}else{
    		out.print("error!");
    	}
     %>
  </body>
</html>
